
<div class="container" *ngIf="ishow1">
  <div class="head">
    <div class="title">申请列表</div>
    <div class="select">
      <nz-select [ngModel]="selectType" [nzOptions]="selectStatus" style="width: 200px;" (ngModelChange)="onChangesStatus($event)" nzPlaceHolder="请选择"></nz-select>
      <button class="search" (click)="sendSelect()">筛选</button>
    </div>
    <div class="title_right"><button class="title" (click)="addPage()">添加申请</button><button class="title">导出</button></div></div>
  <nz-table nzBordered [nzData]="info" nzTableLayout="fixed" [nzPageSize]="5" [nzFrontPagination]=true>
    <thead>
    <tr>
      <th nzWidth="5%"> 序号</th>
      <th nzWidth="10%">申请部门</th>
      <th nzWidth="10%">申请时间</th>
      <th nzWidth="10%">招聘岗位</th>
      <th nzWidth="10%">招聘数量</th>
      <th nzWidth="10%">编制数量</th>
      <th nzWidth="10%">招聘原因</th>
      <th nzWidth="10%">招聘方式</th>
      <th nzWidth="10%">状态</th>
      <th nzWidth="15%">操作</th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let data of info;let i=index">
      <ng-container>
        <td style="text-align: center">{{i+1}}</td>
        <td>{{ data.DeptList[data.DeptIndex].Name}}</td>
        <td>{{ data.RecruitmentPlan.PushDate}}</td>
        <td>{{ data.Job.JobName }}</td>
        <td>{{ data.RecruitmentPlan.TargetCount }}</td>
        <td>{{ data.RecruitmentPlan.Establishment }}</td>
        <td>
          <div *ngIf="data.RecruitmentPlan.Reason==0">未知</div>
          <div *ngIf="data.RecruitmentPlan.Reason==1">增编</div>
          <div *ngIf="data.RecruitmentPlan.Reason==2">替换</div>
          <div *ngIf="data.RecruitmentPlan.Reason==3">调岗</div>
          <div *ngIf="data.RecruitmentPlan.Reason==4">其他</div>
        </td>
        <td>
          <div *ngIf="data.RecruitmentPlan.Way==0">未知</div>
          <div *ngIf="data.RecruitmentPlan.Way==1">校招</div>
          <div *ngIf="data.RecruitmentPlan.Way==2">社招</div>
          <div *ngIf="data.RecruitmentPlan.Way==3">猎头</div>
        </td>
        <td>
          <div *ngIf="data.RecruitmentPlan.CheckStatus==1" style="color: #f38a77">待事业部审核</div>
          <div *ngIf="data.RecruitmentPlan.CheckStatus==2" style="color: #ff0000">已驳回</div>
          <div *ngIf="data.RecruitmentPlan.CheckStatus==3" style="color: #f38a77">待人事部确认</div>
          <div *ngIf="data.RecruitmentPlan.CheckStatus==4" style="color: #f38a77">待总经理确认</div>
          <div *ngIf="data.RecruitmentPlan.CheckStatus==5" style="color: #00ff99">已通过</div>
        </td>
        <td style="text-align: center">
          <button *ngIf="data.RecruitmentPlan.CheckStatus==1" nz-button nzType="primary" (click)="update(data)">修改</button>
          <button *ngIf="data.RecruitmentPlan.CheckStatus==2" nz-button nzType="primary" (click)="check(data)">查看</button>
          <button *ngIf="data.RecruitmentPlan.CheckStatus==0" nz-button nzType="primary" (click)="warn(0)" style="background-color: #dedede;color: #000;border:none">修改</button>
          <button *ngIf="data.RecruitmentPlan.CheckStatus==3" nz-button nzType="primary" (click)="warn(3)" style="background-color: #dedede;color: #000;border:none">修改</button>
          <button *ngIf="data.RecruitmentPlan.CheckStatus==4" nz-button nzType="primary" (click)="warn(4)" style="background-color: #dedede;color: #000;border:none">修改</button>
          <button *ngIf="data.RecruitmentPlan.CheckStatus==5" nz-button nzType="primary" (click)="warn(5)" style="background-color: #dedede;color: #000;border:none">修改</button>
        </td>
      </ng-container>
    </tr>
    </tbody>
  </nz-table>
</div>

<div class="container" *ngIf="ishow2">
  <div class="head">
    <button nz-button nzType="primary" (click)="back()" style="float: left">返回</button>
  </div>
  <app-re-application-add [optype]="optionType" [depart]="departResult" [infoLi]="infoLi" [Jobvalue]="Jobdefault" [departDefault]="Deptdefault" [JobList]="JobList"></app-re-application-add>
</div>

<nz-modal [(nzVisible)]="isVisible1" nzTitle="The first Modal" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
  <ng-container>
    <p *ngIf="n==0" class="note">信息审核中，无法修改</p>
    <p *ngIf="n==3" class="note">信息审核中，无法修改</p>
    <p *ngIf="n==4" class="note">信息审核中，无法修改</p>
    <p *ngIf="n==5" class="note">信息审核已通过，无法修改</p>
  </ng-container>
</nz-modal>

<nz-modal [(nzVisible)]="isVisible2" nzTitle="驳回理由" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
  <ng-container>
    <div>{{remark}}</div>
  </ng-container>
</nz-modal>
